#include<bits/stdc++.h>

using namespace std;

int main() {
    int n = 10000;
    int x, y, z;
    for (x = 0; 5 * x <= n; x++)
        for (y = 0; 3 * y <= n; y++) {
            z = n - x - y;
            if (x + y + z == n && 5 * x + 3 * y + z / 3 == n && z % 3 == 0)
                printf("(%d %d %d)\n", x, y, z);
        }
    return 0;
}
